package zytrade.service.mobile.dao;
import com.alibaba.fastjson.parser.deserializer.AbstractDateDeserializer;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import zytrade.service.mobile.entity.TerminalTypeDO;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;
/**
 * @Author: Wu
 * @Description: 终端类型dao接口
 * @Date: Create in 15:31 2017/11/9
 * @Modified By:
 */
public interface TerminalTypeMapper {
    /**
     * @Author: Wu
     * @param id
     * @Description: 根据id删除
     * @Date:  Create in 15:31 2017/11/9
     */
    public int deleteByPrimaryKey(Long id);

    /**
     * @Author: Wu
     * @param record
     * @Description: 插入实体
     * @Date:  Create in 15:31 2017/11/9
     */
    public int insert(TerminalTypeDO record);

    /**
     * @Author: Wu
     * @param record
     * @Description: 选择性插入
     * @Date:  Create in 15:31 2017/11/9
     */
    public int insertSelective(TerminalTypeDO record);

    /**
     * @Author: Wu
     * @param id
     * @Description: 根据id查询实体
     * @Date:  Create in 15:31 2017/11/9
     */
    public TerminalTypeDO selectByPrimaryKey(Long id);

    /**
     * @Author: Wu
     * @param record
     * @Description: 根据id选择性更新实体
     * @Date:  Create in 15:31 2017/11/9
     */
    public int updateByPrimaryKeySelective(TerminalTypeDO record);

    /**
     * @Author: Wu
     * @param record
     * @Description: 根据id更新所有字段
     * @Date:  Create in 15:31 2017/11/9
     */
    public int updateByPrimaryKey(TerminalTypeDO record);

    /**
     * @Author: Wu
     * @param record
     * @Description:查根据传入对象查询所有记录
     * @Date:   Create in 15:31 2017/11/9
     */
    public List<TerminalTypeDO> searchEntityList(TerminalTypeDO record );


    /**
     * @Author: Wu
     * @Description: 查询总数
     * @Date: Create in 15:31 2017/11/9
     */
    public int getEntityCount();

    /**
     * @Author: Wu
     * @param terminalTypeDO
     * @Description: 逻辑删除信息
     * @Date:  Create in 15:31 2017/11/9
     */
    public int logicDelete(TerminalTypeDO terminalTypeDO) ;

    /**
     * @Author: Wu
     * @param ids
     * @Description: 批量逻辑删除
     * @Date:  Create in 15:31 2017/11/9
     */
    public int logicDeletes(List ids) ;

    /**
     * @Author: Wu
     * @param orgId
     * @Description: 根据机构ID查询终端类型列表
     * @Date:  Create in 15:31 2017/11/9
     */
    public List<TerminalTypeDO> searchORGTerminalList(Long orgId) ;

    /**
     * @Author: Wu
     * @param map
     * @Description: 根据机构id和终端类型id查询
     * @Date:  Create in 15:31 2017/11/9
     */
    public TerminalTypeDO searchOrgTerminal(Map<String, Object> map) ;

    /**
     * @Author: Wu
     * @param id
     * @Description: 根据终端类型id获取终端类型名称
     * @Date:  Create in 15:31 2017/11/9
     */
    public TerminalTypeDO getTemrminalNameById(Long id) ;

    /**
     * @Author: Wu
     * @param terminalTypeDO
     * @Description: 查询未设置终端等级的
     * @Date:  Create in 15:31 2017/11/9
     */
    public List<TerminalTypeDO> searchValidEntityList(TerminalTypeDO terminalTypeDO) ;

    /**
     * @Author: Wu
     * @param map
     * @Description: 终端名称自动完成
     * @Date:  Create in 15:31 2017/11/9
     */
    public List<String> searchTerminalName(Map<String, Object> map) ;

}